package service;

/**
 * @author wx-li
 * @company 希睿科技(www.xraitech.com)
 * @copyright (c) 2018 希睿科技( www.xraitech.com )Inc. All rights reserved.
 * @date 2020/10/16 14:15
 * @since JDK1.8
 */
public class FXNewsProvider {
    private IFXNewsListener newsListener;
    private IFXNewsPersister newsPersister;
    private String source;

    public FXNewsProvider(IFXNewsListener newsListener, IFXNewsPersister newsPersister) {
        this.newsListener = newsListener;
        this.newsPersister = newsPersister;
    }

    public void getAndPersistNews() {
        System.out.println("call getAndPersistNews");
    }

    public void getAndPersistNews(String msg) {
        System.out.println(msg);
    }

    public void setNewsListener(IFXNewsListener newsListener) {
        this.newsListener = newsListener;
    }


    public void setNewsPersister(IFXNewsPersister newsPersister) {
        this.newsPersister = newsPersister;
    }

    public void setSource(String source) {
        this.source = source;
    }
}
